package mapping

import (
	"maya-service/model"
	"maya-service/model/entity"
)

// QuanxiQuestionsEntityToDto entity data transfer
func QuanxiQuestionsEntityToDto(quanxiQuestions []*entity.QuanxiQuestion) []*model.QuanxiQuestionInfo {
	out := make([]*model.QuanxiQuestionInfo, 0, len(quanxiQuestions))
	for _, c := range quanxiQuestions {
		out = append(out, QuanxiQuestionEntityToDto(c))
	}
	return out
}

// QuanxiQuestionEntityToDto entity data transfer
func QuanxiQuestionEntityToDto(e *entity.QuanxiQuestion) *model.QuanxiQuestionInfo {
	return &model.QuanxiQuestionInfo{

		Id: e.Id,

		UserId: e.UserId,

		Question: e.Question,

		Options: e.Options,

		Type: e.Type,

		CreatedAt: e.CreatedAt,

		UpdatedAt: e.UpdatedAt,
	}
}
